#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project    :icac2 
@File       :serializers.py
@Author     :wangfan13
@Date       :2021/5/23 15:30 
"""
from rest_framework import serializers

from apps.case.models import Case
from apps.other.models import RbSettleCheck


class CaseSerializers(serializers.ModelSerializer):
    class Meta:
        model = Case
        fields = '__all__'



class CaseCreateSerializers(serializers.ModelSerializer):
    settlecode = serializers.CharField(label='结算案编号')
    ordercode = serializers.CharField(label='订单编号')
    agent = serializers.CharField(label='代理商名称')
    settlement_name = serializers.CharField(label='结算案名字')
    submitdate = serializers.DateField(label='提交日期')
    settleowner = serializers.CharField(label='政策解释人')
    settlement_dept = serializers.CharField(label='商用事业部')
    reaptetimes = serializers.IntegerField(label='重复次数')
    realrefund = serializers.DecimalField(max_digits=3, decimal_places=2, label='实际金额')
    shouldrefund = serializers.DecimalField(max_digits=3, decimal_places=2, label='应反金额')
    updatetime = serializers.DateTimeField(label='更新时间')
    order_list = serializers.ListField(label='订单id')
    so_list = serializers.ListField(label='订单os')

    class Meta:
        model = RbSettleCheck
        fields = '__all__'
